home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 17
/
CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso
/
CUCD
/
Online
/
AminetParse
/
AddAminet.thor
next >
Wrap
Text File
|
1997-09-19
|
2KB
|
68 lines
/*
$VER: AddAminet.thor 1.1 (19.9.97)
by Neil Bothwick
*/
/* Adds Aminet INDEX or RECENT files to file database */
/* using AminetParse by Daniel J. Andrea II <dandrea@unix.tfs.net> */
/* AminetParse must be in the thor/bin directory */
options results
/* ;;;Needs THOR and bbsread.library functions */
thorport = address()
if left(thorport,5) ~= 'THOR.' then do
say 'Addaminet.thor must be run from within Thor.'
exit
end
if ~show('p', 'BBSREAD') then do
address command
'run >nil: `GetEnv THOR/THORPath`bin/LoadBBSRead'
'WaitForPort BBSREAD'
end
;;;
/* ;;;Get current system name and directory */
address(thorport)
drop TMP.
'CURRENTSYSTEM stem TMP'
System = TMP.BBSNAME
address 'BBSREAD'
drop TMP.
'GETBBSDATA "'system'" stem TMP'
SystemDir = TMP.BBSPATH
call open('env','ENV:THOR/THORPath','R');ProgDir = readln('env');call close('env')
;;;
/* ;;;Select INDEX file */
address(thorport)
'REQUESTFILE TITLE "Select INDEX or RECENT file" ID "" PAT #? FP'
if RC=5 then exit
if RC > 0 then do
'REQUESTNOTIFY TEXT "'THOR.LASTERROR'" BT " OK "'
exit
end
Index = result
;;;
/* ;;;Offer to delete old filebase */
if (pos('INDEX',upper(Index)) > 0) & (exists(SystemDir'File.tags') > 0) then do
'REQUESTNOTIFY TEXT "This appears to be a complete Aminet index.\nDo you want to clear the file database first?" BT "Yes|No|Cancel"'
if result = 0 then exit
if result = 1 then do
if exists(ProgDir'Rexx/BBSRead/ClearFileDataBase.br') then address command 'rx' ProgDir'Rexx/BBSRead/ClearFileDataBase.br' System
else 'REQUESTNOTIFY TEXT "Rexx/BBSRead/ClearFileDataBase.br\nnot found in Thor path" BT " OK "'
end
end
;;;
/* ;;; Option to use SortMail.excl if present */
exclude = ''
if exists(SystemDir'Sortmail.excl') then do
'REQUESTNOTIFY "Do you want to use the filters in your Sortmail.excl file?" BT "Yes|No|Cancel"'
if result = 0 then exit
if result = 1 then exclude = 'EXCLUDE'
end
;;;
/* ;;;Add INDEX to database */
address command 'bin/AminetParse "'System'" "'Index'"' exclude
;;;